<%--
    Document   : main
    Created on : 29-set-2010, 14.03.55
    Author     : erola
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Pagina personale</title>
        <link rel="stylesheet" type="text/css" href="css/style.css"/>
        <base target="_self"/>
    </head>
    <body>
        <%@include file="WEB-INF/jspf/header.jspf"%>
        <!-- start page -->
        <div id="content">

            <c:choose>
                <c:when test="${!empty sessionScope.username}">
                    <div class="post">
                        <h2 class="title">Aggiungi un desiderio</h2>
                        <div class="entry">
                            <form action="InserisciDesiderio" method="post" >
                                <input type="hidden" name="request_type" value="signup"/>
                                <table>
                                    <tr>
                                        <td><p>Categoria: </p></td>
                                        <td>
                                            <select name="categoria">
                                                <option value="Letteratura" selected>Letteratura</option>
                                                <option value="Elettronica">Elettronica</option>
                                                <option value="Telefonia">Telefonia</option>
                                                <option value="Cinema">Cinema</option>
                                                <option value="Musica">Musica</option>
                                                <option value="Casa">Casa</option>
                                                <option value="Animali">Animali</option>
                                            </select>

                                        </td>
                                    </tr>
                                    <tr>
                                        <td><p>Nome: </p></td>
                                        <td><input type="text" name="nome" size="20" maxlength="48" /></td>
                                    </tr>
                                </table>


                                <p>Descrizione del desiderio (es. marca, modello, ecc.)</p>
                                <textarea rows="7" name="descrizione" cols="30"></textarea>

                                <p><input type="submit" value="Inserisci desiderio" name="B3">
                                <input type="reset" value="Cancella tutto" name="B4"></p>
                            </form>
                        </div>
                    </div>
                </c:when>

                <c:otherwise>
                    <div class="post">
                        <h2 class="title">Errore</h2>

                        <div class="entry">
                            <p>Non sei loggato!</p>

                        </div>

                    </div>
                </c:otherwise>
            </c:choose>
        </div>

        <%@include file="WEB-INF/jspf/nav.jspf"%>
        <!-- end page -->

        <%@include file="WEB-INF/jspf/footer.jspf"%>
    </body>
</html>